import React,{Component} from 'react';
import HeaderBar from '../../components/headerNav/headBar';
import { hashHistory } from 'react-router';
import success from '../../img/icon/success.png'
import cookie from 'react-cookie';
import './enrollSuccess.css'


export default class EnrollSuccess extends Component{
    constructor(props){
        super(props);
        this.state={
            id:this.props.location.query.id,
            remark:cookie.load('remark')
        }
    }


    render(){
        return(
            <div className="enrollSuccess">
                <HeaderBar content="预约成功"></HeaderBar>
                <div className="enrollSuccessContent">
                    <div >
                        <p>
                            <img src={success} alt=""/>
                            <span>感谢您的预约</span>
                        </p>
                        <p>
                            {this.state.remark}
                        </p>
                        <p className="red-color">
                            您可以在  我的-礼包中心-有您的新预约订单  查看您的预约结果
                        </p>
                    </div>
                </div>

                <div className="lookOrderBtn" onClick={()=>{
                    hashHistory.push({
                        pathname: '/enrollOrder',
                        query:{
                            id:this.state.id
                        }
                    })
                }}>
                    查看订单
                </div>
            </div>
        )
    }
}